package com.kingyun.gpsinspection.purificationservice.facade.service.tdm;

import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.EmployeeVo;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.RedisValue;
import com.kingyun.gpsinspection.purificationservice.facade.model.tdm.*;

import java.util.List;

/**
 * Created by liyi on 2016/12/15.
 */
public interface WorkPermitService {
    /**
     * 保存
     * @param redisValue
     * @param employeeVo
     * @param workPermit
     * @param uploadFiles
     * @param deletedFiles
     * @param workOrderList
     * @return
     */
    WorkPermit saveWorkPermit(RedisValue redisValue, EmployeeVo employeeVo, WorkPermit workPermit, String uploadFiles, String deletedFiles, List<WorkOrderVo> workOrderList);

    /**
     * 根据流程实例ID查询
     * @param piid
     * @return
     * @throws Exception
     */
    WorkPermitVo findWorkPermit(String piid)throws Exception;

    /**
     * 根据ID更新
     * @param taskLink
     * @param node
     * @param workPermitId
     * @return
     * @throws Exception
     */
    int updateById(TaskLink taskLink, Short node, String workPermitId) throws Exception;

    /**
     * 处理任务
     * @param redisValue
     * @param employeeVo
     * @param workPermit
     * @param workOrderList
     * @param taskLink
     * @return
     */
    int disposeTask(RedisValue redisValue, EmployeeVo employeeVo, WorkPermit workPermit, List<WorkOrderVo> workOrderList, TaskLink taskLink);

    /**
     * 根据主键查询
     * @param id
     * @return
     */
    WorkPermitVo queryByPrimaryKey(String id);
}
